﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using SMBL.Interface.Database;
using System.Collections.Generic;
/// <summary>
///OldtoNewSql 的摘要说明
/// </summary>
public class OldtoNewSql:ISql
{
    protected Object[] key;
    protected Object[] value;
    protected String sql;
    protected List<KeyValuePair<String, Object>> temp;
    protected KeyValuePair<String, Object> temppair;
    public OldtoNewSql()
    {
    }

    #region ISql 成员
    /// <summary>
    /// 自动包装参数
    /// </summary>
    /// <returns></returns>
    public List<KeyValuePair<String, Object>> GetParameters()
    {
        temp = new List<KeyValuePair<String, Object>>();
        for (int i = 0; i < key.Length; i++)
        {
            temppair = new KeyValuePair<String, Object>((String)key[i], value[i]);
            temp.Add(temppair);
        }
        return temp;
    }

    public virtual string GetSql()
    {
        throw new NotImplementedException();
    }

    #endregion
}
